package de.szut.util;

/**
 * Utility class for converting the integer results
 * of comparisons to easily readable enum values
 * @author Marc Huisinga
 *
 */
public final class ComparisonConverter {
	
	/**
	 * Converts a comparison result to a readable enum result
	 * @param outputOfComparison - Output of a comparison
	 * @return ComparisonResult readable enum value
	 */
	public ComparisonResult convertComparison(int outputOfComparison) {
		if (outputOfComparison < 0) {
			return ComparisonResult.SMALLER;
		} else if (outputOfComparison > 0) {
			return ComparisonResult.BIGGER;
		} else {
			return ComparisonResult.EQUALS;
		}
	}
	
	
}
